package com.hugesoft.jxgs.utils;

import com.hugesoft.logic.managers.common.Constans;

public class CheckInputUtil {
	// 警号是否合法
	public static boolean ispolicenoverified(String policeno) {
		boolean ret = true;
		if (policeno == null || policeno.length() == 0) {
			ret = false;
		}
		return ret;
	}

	// 密码是否合法
	public static boolean ispolicepasswordverified(String password) {
		boolean ret = true;
		if (password == null || password.length() == 0) {
			ret = false;
		}
		return ret;
	}

	// 车号是否合法
	public static boolean isbusnoverified(String busno) {
		boolean ret = true;
		if (busno == null || busno.length() == 0) {
			ret = false;
		}
		return ret;
	}

	public static boolean istrafficnoverified(String trafficno) {
		boolean ret = true;
		if (trafficno == null || trafficno.length() == 0) {
			ret = false;
		}
		return ret;
	}

	public static boolean islicencenoverified(String licenceno) {
		boolean ret = true;
		if (licenceno == null || licenceno.length() == 0) {
			ret = false;
		}
		return ret;
	}

	public static boolean isnameverified(String name) {
		boolean ret = true;
		if (name == null || name.length() == 0) {
			ret = false;
		}
		return ret;
	}

	public static boolean isdrivertypeverified(String type) {
		boolean ret = true;
		if (type == null || type.length() == 0) {
			ret = false;
		}
		return ret;
	}

	public static boolean isdriverageverified(String age) {
		boolean ret = true;
		if (age == null || age.length() == 0) {
			ret = false;
		}
		return ret;
	}

	public static boolean isbuspicverified(String pic) {
		if(pic == null)
		{
			return false;
		}
		String imgurls[] = pic.split(Constans.PICPATHSPLITOR);
		int count = 0;
		for (int j = 0; j < imgurls.length; j++) {
			String path = imgurls[j];
			if (path.equalsIgnoreCase("null") || path.length() == 0) {
				count++;
			}
		}
		if (count > 2) {
			return false;
		}
		return true;
	}
	
	public static boolean issigverified(String sig)
	{
		boolean ret = true;
		if (sig == null || sig.length() == 0) {
			ret = false;
		}
		return ret;
	}
}
